package com.kapcb.common.enums;

/**
 * <a>Title: WebFilterOrder </a>
 * <a>Author: kapcb <a>
 * <a>Description: WebFilterOrder <a>
 *
 * @author Kpacb
 * @version 1.0
 * @date 2024/5/1 14:53
 * @since 1.0
 */
public interface WebFilterOrder {

    int CORS_FILTER = Integer.MIN_VALUE;

    int TRACE_FILTER = CORS_FILTER + 1;

    int REQUEST_BODY_CACHE_FILTER = Integer.MIN_VALUE + 500;

    /**
     * OrderedRequestContextFilter 默认为 -105，用于国际化上下文等等
     * 需要保证在 ApiAccessLogFilter 前面
     */
    int TENANT_CONTEXT_FILTER = -104;

    /**
     * 需要保证在 RequestBodyCacheFilter 后面
     */
    int API_ACCESS_LOG_FILTER = -103;

    /**
     * 需要保证在 RequestBodyCacheFilter 后面
     */
    int XSS_FILTER = -102;

    /**
     * Spring Security Filter 默认为 -100，可见 org.springframework.boot.autoconfigure.security.SecurityProperties 配置属性类
     * 需要保证在 Spring Security 过滤器后面
     */
    int TENANT_SECURITY_FILTER = -99;

    /**
     * 需要保证在 Spring Security 过滤后面
     */
    int FLOWABLE_FILTER = -98;

    int DEMO_FILTER = Integer.MAX_VALUE;

}
